<template>
    <el-container :style="{backgroundColor:'#fff',height:h+'px',}">
      <el-header class="image-header">
        <el-button type="success" size="small" @click="handleOpenCreate">新增图片分类</el-button>
        <el-button type="warning" size="small" @click="handleUploadFile">上传图片</el-button>

      </el-header>
      <el-container>
        <ImageAside ref="ImageAsideRef"/>
        <ImageMain ref="ImageMainRef"/>
      </el-container>
    </el-container>
</template>
<script setup>
import {ref} from 'vue'
import ImageAside from '~/components/ImageAside.vue'
import ImageMain from '~/components/ImageMain.vue'


//高度设置
const windowHeight= window.innerHeight || document.body.clientHeight
const h=windowHeight-64-44-40

const ImageAsideRef=ref(null)
const handleOpenCreate=()=>{
  ImageAsideRef.value.handleCreate()
}
const ImageMainRef=ref(null)

const handleUploadFile=()=>{
  ImageMainRef.value.handleUpload()
}

</script>
<style scoped>
.image-header{
    border-bottom: 1px solid #c4c4c4;
    display: flex;
    align-items: center;
}

</style>